//
//  PlayListTableViewCell.m
//  JZMCFM
//
//  Created by MJL on 15/11/3.
//  Copyright (c) 2015年 陈卓. All rights reserved.
//

#import "PlayListTableViewCell.h"
#import "PlayListModel.h"
@implementation PlayListTableViewCell



- (void)setCellDataWithModel:(PlayListModel *)model
{
    self.titleLabel.text = model.title;
    NSString *durationtimes = [NSString stringWithFormat:@"%.2f",model.duration / 60];
    self.durationLabel.font = [UIFont systemFontOfSize:13.0];
    self.durationLabel.text = durationtimes;
    NSString *comments = [NSString stringWithFormat:@"%ld",model.comments];
    self.commentsLabel.font = [UIFont systemFontOfSize:13.0];
    self.commentsLabel.text =comments;
    NSString *playstimes = [NSString stringWithFormat:@"%.2f万",model.playtimes / 10000];
    self.playtimesLabel.font = [UIFont systemFontOfSize:13.0];
    self.playtimesLabel.text = playstimes;
    self.coverSmallImage.layer.cornerRadius = 20;
    self.coverSmallImage.clipsToBounds = YES;
    if ([model.coverMiddle isEqualToString:@""]) {
        [self.coverSmallImage sd_setImageWithURL:[NSURL URLWithString:model.albumImage]];
    }else{
    [self.coverSmallImage sd_setImageWithURL:[NSURL URLWithString:model.coverMiddle]];
    }
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
